<div class='span6'>
  <h2> 登录 </h2>

  <%- if flash[:error] %>
    <div class="alert alert-block clearfix">
      <h4>Warning!</h4>
      <%= flash[:error] %>
    </div>
  <% end %>

  <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: 'form-horizontal'}) do |f| %>
    <div class="form-inputs">
      <%= f.input :email, :required => false, :autofocus => true, label: '邮箱' %>
      <%= f.input :password, :required => false, label: '密码' %>
      <%= f.input :remember_me, :as => :boolean, label: '记住我' if devise_mapping.rememberable? %>
    </div>

    <div class="form-actions">
      <%= f.button :submit, "登录", class: 'btn btn-primary' %>
    </div>
  <% end %>

  <%= render "layouts/social_connect" %>

</div>
<div class='span3'>

  <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
    <%= link_to "忘记密码?", new_password_path(resource_name) %><br />
  <% end -%>

  <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
    <%= link_to "立即注册", new_registration_path(resource_name) %><br />
  <% end -%>
</div>


